Skip to content

Added --clean flag in 'compile' command #1019

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 9, 2020

Conversation

cmaglie
Copy link
Member

@cmaglie cmaglie commented Oct 8, 2020

This PR adds the --clean flag to the compile command. This flag has two effects:

  • force a cleanup of the build folder, so sketch and libraries and variants are recompiled
  • force a rebuild of the core, even if a previously cached core.a is found

I've extended the WipeoutBuildPathIfBuildOptionsChanged action, that seemed the best place to implement this.
I've reused and refactored the already existing clean-up function.

Fix #969

@cmaglie cmaglie self-assigned this Oct 9, 2020
@cmaglie cmaglie added component/CLI type: enhancement Proposed improvement labels Oct 9, 2020
Copy link
Collaborator

@matthijskooijman matthijskooijman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

I wonder if there should also be a clean command, so you can clean without also building (e.g. to clean up after a build and not litter temporary directories)?

@cmaglie
Copy link
Member Author

cmaglie commented Oct 9, 2020

I wonder if there should also be a clean command, so you can clean without also building (e.g. to clean up after a build and not litter temporary directories)?

Maybe, but I have no time to work on it right now. For the moment I'll merge this one as is and we'll see...

@cmaglie cmaglie merged commit 1ea7518 into arduino:master Oct 9, 2020
@matthijskooijman
Copy link
Collaborator

For the moment I'll merge this one as is and we'll see...

Sounds good, thanks!

@cmaglie cmaglie deleted the added_cleanup_command branch October 11, 2020 16:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement Proposed improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow forcing a clean build and/or cleaning build dir
2 participants